package dao;

import java.util.List;

import org.hibernate.Session;

import modele.Moduleprofil;


import persistence.BaseDAO;

public class ModuleprofilDAO{
	
	public static void ajouterModuleprofil(Moduleprofil moduleprofil, Session session) throws Exception{
		BaseDAO.getInstance().ajouter(moduleprofil,session);
	}

	public static void modifierModuleprofil(Moduleprofil moduleprofil, Session session) {
		BaseDAO.getInstance().modifier(moduleprofil,session);
	}

	public static void SupprimerModuleprofil(Moduleprofil moduleprofil, Session session) {
		BaseDAO.getInstance().delete(moduleprofil,session);
	}

	public static Object getModuleprofil(int id, Session session) {
		return BaseDAO.getInstance().getObject(Moduleprofil.class, id,session);
	}

	public static List getListModuleprofil(String requette, Session session) {
		return BaseDAO.getInstance().getListObject(requette,session);
	}

	public static List getListModuleprofil(String requette, Session session,int firstResult,int maxResults) {
		return BaseDAO.getInstance().getLimitedListObject(requette,firstResult,maxResults,session);
	}
}